package d4l.model;



import java.util.*;


public class TeachingMethod {

    private String name;

    // ratios
    private HashMap<CognitiveActivity, Float> cognitiveActivityMap;


    public TeachingMethod(String name) {
        setName(name);
        initialiseCognitiveActivityMap();
    }


    private void initialiseCognitiveActivityMap() {
        cognitiveActivityMap = new HashMap<CognitiveActivity, Float>();

        Collection<CognitiveActivity> cognitiveActivities = CognitiveActivity.getCognitiveActivities();
        for (CognitiveActivity cognitiveActivity : cognitiveActivities)
            setCognitiveActivityWeight(cognitiveActivity, 1.0f);
    }


    // assumes that cognitive activity already in hashmap.
    public void setCognitiveActivityWeight(CognitiveActivity cognitiveActivity,
                                           float weight) {
        cognitiveActivityMap.put(cognitiveActivity, weight);
    }


    // note: should use synonyms eventually
    public void setName(String name) {
        this.name = name;
    }


    public String getName() {
        return name;
    }

}
